x86: Fix mwait usage when doing cpu offline
authorKeir Fraser <keir@xen.org>
Thu, 24 Feb 2011 09:32:41 +0000 (09:32 +0000)
committerKeir Fraser <keir@xen.org>
Thu, 24 Feb 2011 09:32:41 +0000 (09:32 +0000)
When cpu is offlined, it cannot access per cpu variable at all.
This patch avoids using per_cpu variable inside play_dead.

Signed-off-by: Shan Haitao <haitao.shan@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
xen/arch/x86/acpi/cpu_idle.c

index a55269fcdab038ab99b75fc6758c094a4fed053f..bb2da8926b320e229abb726c488b300dab9d36c2 100644 (file)
@@ -569,7 +569,8 @@ static void acpi_dead_idle(void)
         {
             case ACPI_CSTATE_EM_FFH:
                 /* Not treat interrupt as break event */
-                mwait_idle_with_hints(cx->address, 0);
+                __monitor((void *)&mwait_wakeup(smp_processor_id()), 0, 0);
+                __mwait(cx->address, 0);
                 break;
             case ACPI_CSTATE_EM_SYSIO:
                 inb(cx->address);